package com.scetop.bank;

public class Account {
    protected double balance;

    public Account(double init_balance){
        this.balance = init_balance;
    }

    public double getBalance(){
        return this.balance;
    }

    public boolean deposit(double account){
        if (account > 0){
            balance += account;
            return true;
        } else {
            return false;
        }
    }

    public boolean withdraw(double money){
        if (money > 0 && money <= balance){
            balance -= money;
            return true;
        }
        return false;
    }

}

